Relax the bounce-buffer copying constraints in dma_sync_single_for_*
authorkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>
Fri, 15 Jul 2005 12:52:02 +0000 (12:52 +0000)
committerkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>
Fri, 15 Jul 2005 12:52:02 +0000 (12:52 +0000)
functions. This fixes certain drivers (e.g., ivtv).
Signed-off-by: Keir Fraser <keir@xensource.com>
linux-2.6-xen-sparse/arch/xen/i386/kernel/pci-dma.c
linux-2.6-xen-sparse/arch/xen/x86_64/kernel/pci-dma.c

index 1fdda04395fbdd1ca04f83249dc291a1e4035afa..dae139a0655266777147d745c181d6836b031602 100644 (file)
@@ -248,7 +248,7 @@ dma_sync_single_for_cpu(struct device *dev, dma_addr_t dma_handle, size_t size,
                if (&ent->list != &dma_map_head) {
                        off = dma_handle - ent->dma;
                        BUG_ON((off + size) > ent->size);
-                       if (direction != DMA_TO_DEVICE)
+                       /*if (direction != DMA_TO_DEVICE)*/
                                memcpy(ent->host+off, ent->bounce+off, size);
                }
        }
@@ -272,7 +272,7 @@ dma_sync_single_for_device(struct device *dev, dma_addr_t dma_handle, size_t siz
                if (&ent->list != &dma_map_head) {
                        off = dma_handle - ent->dma;
                        BUG_ON((off + size) > ent->size);
-                       if (direction != DMA_FROM_DEVICE)
+                       /*if (direction != DMA_FROM_DEVICE)*/
                                memcpy(ent->bounce+off, ent->host+off, size);
                }
        }
index b21c7df4f0092d5d104e3360ede719a9d431df17..be30d893dab2882f58f40e99a1b4a49f596df781 100644 (file)
@@ -302,7 +302,7 @@ dma_sync_single_for_cpu(struct device *dev, dma_addr_t dma_handle, size_t size,
                if (&ent->list != &dma_map_head) {
                        off = dma_handle - ent->dma;
                        BUG_ON((off + size) > ent->size);
-                       if (direction != DMA_TO_DEVICE)
+                       /*if (direction != DMA_TO_DEVICE)*/
                                memcpy(ent->host+off, ent->bounce+off, size);
                }
        }
@@ -326,7 +326,7 @@ dma_sync_single_for_device(struct device *dev, dma_addr_t dma_handle, size_t siz
                if (&ent->list != &dma_map_head) {
                        off = dma_handle - ent->dma;
                        BUG_ON((off + size) > ent->size);
-                       if (direction != DMA_FROM_DEVICE)
+                       /*if (direction != DMA_FROM_DEVICE)*/
                                memcpy(ent->bounce+off, ent->host+off, size);
                }
        }